package com.jsu.hotelmanagement;

import com.jsu.hotelmanagement.observerModel.ObserverModelApplication;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * @author Mo
 * @createTime 2022/10/24 20:49
 * @description 主启动类
 */
@SpringBootApplication
public class HotelManagementApplication implements CommandLineRunner {

    @Autowired
    ObserverModelApplication observerModelApplication;

    public static void main(String[] args) {
        System.out.println(System.getProperty("user.dir"));
        System.out.println("操作系统为: " + System.getProperty("os.name"));
        System.out.printf("本计算机的核数：%d%n", Runtime.getRuntime().availableProcessors());
        SpringApplication.run(HotelManagementApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        observerModelApplication.run();
    }
}
